/** 
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
* 
* MpmProjectPlanServiceAuto
* 项目策划
* 
* 修改纪录
* 2021-01-07 版本：1.0 wudaliang 创建。
* @version 版本：1.0
* @author 作者：wudaliang
* 创建日期：2021-01-07
*/

package com.topscomm.mpm.service.impl.auto;

import com.topscomm.mpm.pojo.MpmProjectEntity;
import com.topscomm.mpm.service.impl.MpmProjectService;
import com.topscomm.pub.util.SpringUtil;
import com.topscomm.pub.util.StringBufferProxy;
import java.util.List;
import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mpm.*;
import com.topscomm.mpm.pojo.MpmProjectPlanEntity;
import com.topscomm.mpm.dao.IMpmProjectPlanDao;
import org.springframework.beans.factory.annotation.Autowired;


public class MpmProjectPlanServiceAuto extends MpmService<MpmProjectPlanEntity,IMpmProjectPlanDao> {

	/**
	 * @author: wudaliang
	 * @date: 2021-01-07
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("orgname") != null) {
			temp = mapRow.get("orgname").toString();
			mapRow.put("disporgname", datacodeCache.getValueDynamic("CboOrg", temp, "code", "name"));
		}
		if (mapRow.get("flowid") != null) {
			temp = mapRow.get("flowid").toString();
			mapRow.put("dispflowid", datacodeCache.getValueDynamic("ApprovalFlow_MpmProjectPlan", temp, "id", "name"));
		}
		if (mapRow.get("state") != null) {
			temp = mapRow.get("state").toString();
			mapRow.put("dispstate", datacodeCache.getValueDynamic("TapApprovalBillState", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mpmProjectPlanDao")
	public void setDao(IBasicDao<MpmProjectPlanEntity> dao) {		
		super.setDao(dao);
	}
}
